package com.hu.zhcc.shiro.controller.xy;


import com.hu.zhcc.shiro.entity.xy.pojo.TAssessQuestion;
import com.hu.zhcc.shiro.service.xy.service.TAssessQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/tAssessQuestion")
public class TAssessQuestionController {

    @Autowired
    private TAssessQuestionService tAssessQuestionService;


    @GetMapping("/querySunQuestion/{id}")
//   (体质测评) 阳虚体质
    public List<TAssessQuestion> querySunQuestion(@PathVariable("id") int id){
        System.out.println(1);
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(4,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryRainQuestion/{id}")
//   (体质测评) 阴虚体质
    public List<TAssessQuestion> queryRainQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(5,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryQiQuestion/{id}")
//   (体质测评) 气虚体质
    public List<TAssessQuestion> queryQiQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(6,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryPingQuestion/{id}")
//   (体质测评) 平和体质
    public List<TAssessQuestion> queryPingQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(7,id);
        System.out.println(tAssessQuestions);
        return tAssessQuestions;
    }
    @GetMapping("/queryTanQuestion/{id}")
//   (体质测评) 痰湿体质
    public List<TAssessQuestion> queryTanQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(8,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryShiQuestion/{id}")
//   (体质测评) 湿热体质
    public List<TAssessQuestion> queryShiQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(9,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryXueQuestion/{id}")
//   (体质测评) 血瘀体质
    public List<TAssessQuestion> queryXueQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(10,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryYuQuestion/{id}")
//   (体质测评) 气郁体质
    public List<TAssessQuestion> queryYuQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(11,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryTeQuestion/{id}")
//   (体质测评) 特禀体质
    public List<TAssessQuestion> queryTeQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(12,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryQPZQuestion/{id}")
//   (心理) 强迫症化
    public List<TAssessQuestion> queryQPZQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(13,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryJLQuestion/{id}")
//   (心理) 焦虑症化
    public List<TAssessQuestion> queryJLQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(14,id);
        return tAssessQuestions;
    }
    @GetMapping("/queryKBQuestion/{id}")
//   (心理) 恐怖症化
    public List<TAssessQuestion> queryKBQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(15,id);
        return tAssessQuestions;
    }


    @GetMapping("/queryFXQuestion/{id}")
//   (风险) 患病情况
    public List<TAssessQuestion> queryFXQuestion(@PathVariable("id") int id){
        List<TAssessQuestion>  tAssessQuestions = tAssessQuestionService.queryAllAnswers(16,id);
        System.out.println(tAssessQuestions);
        return tAssessQuestions;
    }
    @GetMapping("/queryEATQuestion/{id}")
//   (风险测评) 膳食摄入情况及饮食情况
    public List<TAssessQuestion> queryEATQuestion(@PathVariable("id") int id){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllAnswers(1,id);
        return tAssessQuestions;
    }
  /*  @GetMapping("/queryEXEQuestion")
//   (风险测评)体力活动
    public List<TAssessQuestion> queryEXEQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(2);
        return tAssessQuestions;
    }
    @GetMapping("/querySMOQuestion")
//   (风险测评)吸烟情况
    public List<TAssessQuestion> querySMOQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(3);
        return tAssessQuestions;
    }*/
  @GetMapping("/queryQPZQuestion")
//   (心理) 强迫症化
  public List<TAssessQuestion> queryQPZQuestion(){
      List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(13);
      return tAssessQuestions;
  }
    @GetMapping("/queryJLQuestion")
//   (心理) 焦虑症化
    public List<TAssessQuestion> queryJLQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(14);
        return tAssessQuestions;
    }
    @GetMapping("/queryKBQuestion")
//   (心理) 恐怖症化
    public List<TAssessQuestion> queryKBQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(15);
        return tAssessQuestions;
    }

    @GetMapping("/querySunQuestion")
//   (体质测评) 阳虚体质
    public List<TAssessQuestion> querySunQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(4);
        return tAssessQuestions;
    }
    @GetMapping("/queryRainQuestion")
//   (体质测评) 阴虚体质
    public List<TAssessQuestion> queryRainQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(5);
        return tAssessQuestions;
    }
    @GetMapping("/queryQiQuestion")
//   (体质测评) 气虚体质
    public List<TAssessQuestion> queryQiQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(6);
        return tAssessQuestions;
    }
    @GetMapping("/queryPingQuestion")
//   (体质测评) 平和体质
    public List<TAssessQuestion> queryPingQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(7);
        return tAssessQuestions;
    }
    @GetMapping("/queryTanQuestion")
//   (体质测评) 痰湿体质
    public List<TAssessQuestion> queryTanQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(8);
        return tAssessQuestions;
    }
    @GetMapping("/queryShiQuestion")
//   (体质测评) 湿热体质
    public List<TAssessQuestion> queryShiQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(9);
        return tAssessQuestions;
    }
    @GetMapping("/queryXueQuestion")
//   (体质测评) 血瘀体质
    public List<TAssessQuestion> queryXueQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(10);
        return tAssessQuestions;
    }
    @GetMapping("/queryYuQuestion")
//   (体质测评) 气郁体质
    public List<TAssessQuestion> queryYuQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(11);
        return tAssessQuestions;
    }
    @GetMapping("/queryTeQuestion")
//   (体质测评) 特禀体质
    public List<TAssessQuestion> queryTeQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(12);
        return tAssessQuestions;
    }


    @GetMapping("/queryAllQuestion")
//   (风险测评) 膳食摄入情况及饮食情况
    public List<TAssessQuestion> queryAllQuestion(){
        List<TAssessQuestion> tAssessQuestions = tAssessQuestionService.queryAllQuestion(1);
        return tAssessQuestions;
    }


}
